<?php
class Master extends AppModel {
	var $name = 'Master';
	var $validate = array(
//		'fecha' => array(
//			'date' => array(
//				'rule' => array('date'),
//				'message' => 'Debe ingresar una fecha',
//				'allowEmpty' => false,
//				//'required' => false,
//				//'last' => false, // Stop validation after this rule
//				//'on' => 'create', // Limit validation to 'create' or 'update' operations
//			),
//		),
//            	'desposits_id' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Debe ingresar un Depósito',
//			),
//		),
//                'states_id' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Debe ingresar un Estado',
//			)
//		),
//                'pericia' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Completar Pericia',
//			)
//		),
//                'foto' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Completar Foto',
//			)
//		),
//                'carpeta' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Completar Carpeta',
//			)
//		),
//                'acta' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Completar Acta ',
//			)
//		),
//               'caja_archivo' => array(
//			'notempty' => array(
//				'rule' => array('notempty'),
//				'message' => 'Completar caja de Archivo',
//			)
//                )
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	var $belongsTo = array(
		'Causes' => array(
			'className' => 'Causes',
			'foreignKey' => 'causes_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Requests' => array(
			'className' => 'Requests',
			'foreignKey' => 'requests_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Vehicles' => array(
			'className' => 'Vehicles',
			'foreignKey' => 'vehicles_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
            	'State' => array(
			'className' => 'State',
			'foreignKey' => 'states_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
                'PoliceState' => array(
			'className' => 'PoliceState',
			'foreignKey' => 'police_states_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Desposit' => array(
			'className' => 'Desposit',
			'foreignKey' => 'desposits_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
        var $hasMany = array(
            'Upload'=>array(
               'className' =>'Upload',
               'foreignKey'=>'masters_id',
                'dependent'=>'true'
            )
        ); 
        
}
